package com.machine.filling.function.main.cardInfoFg;

import com.machine.filling.base.baseMvp.IBasePresenter;
import com.machine.filling.base.baseMvp.IBaseView;
import com.machine.filling.net.serialPort.receive.Receive_PrepareFueling;
import com.machine.filling.net.ws.response.WsResCardInfoBean;

/**
 * Created by Administrator on 2018/2/1 0001.
 */

public class CardInfoFgContract {
    public interface Presenter extends IBasePresenter{
        /**
         * 获取油卡信息
         */
        void getCardInfo();

        /**
         * 向油机下发卡信息  错误卡(用于弹出卡片)
         * @param portNum
         * @param cmd_prepare
         */
        void port_sendCardInfo_1101_errorCard(String portNum,Receive_PrepareFueling cmd_prepare);
    }

    public interface View extends IBaseView<Presenter>{
        /**
         * 获取油枪id
         * @return
         */
        String getGunId();

        /**
         * 获取卡号
         * @return
         */
        String getCardNum();

        /**
         * 获取加密卡号
         * @return
         */
        String getEncryCarNum();

        /**
         * 显示油卡信息结果
         */
        void showCardInfoResult(WsResCardInfoBean cardBean);

        /**
         * 显示获取卡信息失败
         */
        void showCardInfoErrorResult(String errorCode, String errorMsg);
    }
}
